//
//  CollectionTableViewCell.m
//  BeanTrip
//
//  Created by houlei on 15/7/13.
//  Copyright (c) 2015年 PandaGroup. All rights reserved.
//

#import "CollectionTableViewCell.h"
#define WIDTH ([UIScreen mainScreen].bounds.size.width)
#define HEIGHT ([UIScreen mainScreen].bounds.size.height)

@implementation CollectionTableViewCell

- (void)dealloc
{
    [_collectionM release];
    [_titleLabel release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}
- (void)createSubViews
{
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 0, WIDTH - 40, 30)];
    [self.contentView addSubview:self.titleLabel];
    [_titleLabel release];
}
- (void)setCollectionM:(CollectionModel *)collectionM
{
    if (_collectionM != collectionM) {
        [_collectionM release];
        _collectionM = [collectionM retain];
    }
    self.titleLabel.text = self.collectionM.title;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
